require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 3,["5"] = 3,["6"] = 4,["7"] = 4,["8"] = 6,["9"] = 6,["10"] = 6,["11"] = 6,["13"] = 9,["14"] = 6,["16"] = 6,["18"] = 12,["21"] = 8,["22"] = 16,["23"] = 17,["24"] = 16,["25"] = 20,["26"] = 21,["27"] = 20,["28"] = 24,["29"] = 25,["30"] = 24,["31"] = 28,["32"] = 29,["33"] = 28,["34"] = 32,["35"] = 33,["36"] = 32,["37"] = 36,["38"] = 37,["39"] = 36,["40"] = 40,["41"] = 41,["42"] = 40,["43"] = 44,["44"] = 45,["45"] = 44,["46"] = 51,["47"] = 52,["48"] = 54,["49"] = 54,["50"] = 54,["51"] = 54,["52"] = 54,["53"] = 54,["54"] = 54,["55"] = 56,["56"] = 51,["57"] = 59,["58"] = 60,["59"] = 59,["60"] = 63,["61"] = 64,["62"] = 63,["63"] = 67,["64"] = 68,["65"] = 67});
local ____exports = {}
local ____handle = require("solar.w3ts.handles.handle")
local Handle = ____handle.Handle
local ____player = require("solar.w3ts.handles.player")
local MapPlayer = ____player.MapPlayer
____exports.Force = __TS__Class()
local Force = ____exports.Force
Force.name = "Force"
__TS__ClassExtends(Force, Handle)
function Force.prototype.____constructor(self)
    if Handle:initFromHandle() then
        Handle.prototype.____constructor(self)
    else
        Handle.prototype.____constructor(
            self,
            CreateForce()
        )
    end
end
function Force.prototype.addPlayer(self, whichPlayer)
    ForceAddPlayer(self.handle, whichPlayer.handle)
end
function Force.prototype.clear(self)
    ForceClear(self.handle)
end
function Force.prototype.destroy(self)
    DestroyForce(self.handle)
end
function Force.prototype.enumAllies(self, whichPlayer, filter)
    ForceEnumAllies(self.handle, whichPlayer.handle, filter)
end
function Force.prototype.enumEnemies(self, whichPlayer, filter)
    ForceEnumEnemies(self.handle, whichPlayer.handle, filter)
end
function Force.prototype.enumPlayers(self, filter)
    ForceEnumPlayers(self.handle, filter)
end
function Force.prototype.enumPlayersCounted(self, filter, countLimit)
    ForceEnumPlayersCounted(self.handle, filter, countLimit)
end
Force.prototype["for"] = function(self, callback)
    ForForce(self.handle, callback)
end
function Force.prototype.getPlayers(self)
    local players = {}
    ForForce(
        self.handle,
        function() return __TS__ArrayPush(
            players,
            MapPlayer:fromEnum()
        ) end
    )
    return players
end
function Force.prototype.hasPlayer(self, whichPlayer)
    return IsPlayerInForce(whichPlayer.handle, self.handle)
end
function Force.prototype.removePlayer(self, whichPlayer)
    ForceRemovePlayer(self.handle, whichPlayer.handle)
end
function Force.fromHandle(self, handle)
    return self:getObject(handle)
end
return ____exports
